
import ReactDOM from 'react-dom'
import KeyCode from '../util/keyCode'

export function getMousePosition(vertical: boolean, e: React.MouseEvent) {
  return vertical ? e.clientY : e.pageX;
}

export function isNotTouchEvent(e: React.TouchEvent) {
  return e.touches.length > 1 || (e.type.toLowerCase() === 'touchend' && e.touches.length > 0)
}

export function getTouchPosition(vertical: string, e: React.TouchEvent) {
  return vertical ? e.touches[0].clientY : e.touches[0].pageX;
}